﻿using System.ComponentModel.Composition;
using VisualWip.Core;
using VisualWip.Core.Columns;
using VisualWip.Core.Interfaces;
using VisualWip.PresentationModel;

namespace VisualWip.TFS2010Providers
{
    [Export(typeof (IColumnProviderViewModel))]
    public class TfsWorkItemProviderViewModel : WorkItemProviderViewModelBase
    {
        [ImportingConstructor]
        public TfsWorkItemProviderViewModel(IColumnBuilder columnBuilder) : base(columnBuilder)
        {
        }

        public override string ProviderName
        {
            get { return TfsWorkItemWorkProvider.ProviderName; }
        }

        public override string HeaderName
        {
            get { return "Team Foundation Server 2010"; }
        }

        public override void RegisterViewModels(IViewModelFactory viewModelFactory)
        {
            viewModelFactory.RegisterSettingsViewModel<WorkSingleColumn, TfsWorkSingleQuerySettingsViewModel>();

            viewModelFactory.RegisterSettingsViewModel<WorkDoingDoneColumn, TfsWorkDoingDoneSettingsViewModel>();
            viewModelFactory.RegisterSettingsViewModel<WorkDoingColumn, TfsWorkDoingSettingsViewModel>();
            viewModelFactory.RegisterSettingsViewModel<WorkDoneColumn, TfsWorkDoneSettingsViewModel>();

            viewModelFactory.RegisterSettingsViewModel
                <WorkInProgressGroupColumn, TfsWorkInProgressGroupSettingsViewModel>();
        }
    }
}